/**
 *  @author phi
 *  @memo   
 */

#pragma once

#include <iostream>
#include <cstdlib>

using namespace std;

namespace tmlib {

    class EventDispatcher;

    namespace events {

        namespace EventInfo {
            enum EventType
            {
                LOAD = 0,
                UNLOAD,

                CLICK,
                DBL_CLICK,

                MOUSE_OUT,
                MOUSE_OVER,
                MOUSE_DOWN,
                MOUSE_UP,

                UPDATE,
                DRAW,

                MOTION_START,
                MOTION_END,
                MOTION_UPDATE,
                MOTION_CHANGE,

                EVENT_TYPE_MAX,
            };
        }


        class Event
        {
        public :
            EventDispatcher*        getTarget(){ return _target; }
            EventInfo::EventType    getType()  { return _type; }

            Event*  setTarget(EventDispatcher* target)  { _target=target; return this; }
            Event*  setType(EventInfo::EventType type)  { _type = type; return this; }

        protected :
            EventDispatcher*        _target;
            EventInfo::EventType    _type;
        };

    }

}